package com.rytx.system.service.impl;

import java.util.List;

import com.rytx.system.domain.vo.ArtUserVo;
import com.rytx.system.service.IArtUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rytx.system.mapper.ArtMessageMapper;
import com.rytx.system.domain.ysp.ArtMessage;
import com.rytx.system.service.IArtMessageService;

/**
 * 消息Service业务层处理
 *
 * @author rytx
 * @date 2024-05-14
 */
@Service
public class ArtMessageServiceImpl implements IArtMessageService
{
    @Autowired
    private ArtMessageMapper artMessageMapper;

    /**
     * 查询消息
     *
     * @param id 消息主键
     * @return 消息
     */
    @Override
    public ArtMessage selectArtMessageById(Long id)
    {
        return artMessageMapper.selectArtMessageById(id);
    }

    /**
     * 查询消息列表
     *
     * @param artMessage 消息
     * @return 消息
     */
    @Override
    public List<ArtMessage> selectArtMessageList(ArtMessage artMessage)
    {
        return artMessageMapper.selectArtMessageList(artMessage);
    }

    /**
     * 新增消息
     *
     * @param artMessage 消息
     * @return 结果
     */
    @Override
    public int insertArtMessage(ArtMessage artMessage)
    {
        return artMessageMapper.insertArtMessage(artMessage);
    }

    /**
     * 修改消息
     *
     * @param artMessage 消息
     * @return 结果
     */
    @Override
    public int updateArtMessage(ArtMessage artMessage)
    {
        return artMessageMapper.updateArtMessage(artMessage);
    }

    /**
     * 批量删除消息
     *
     * @param ids 需要删除的消息主键
     * @return 结果
     */
    @Override
    public int deleteArtMessageByIds(Long[] ids)
    {
        return artMessageMapper.deleteArtMessageByIds(ids);
    }

    /**
     * 删除消息信息
     *
     * @param id 消息主键
     * @return 结果
     */
    @Override
    public int deleteArtMessageById(Long id)
    {
        return artMessageMapper.deleteArtMessageById(id);
    }

    @Override
    public ArtUserVo selectArtUserById(Long id) {
        return artMessageMapper.selectArtUserById(id);
    }
}
